﻿<UserControl 
    x:Class="PersianEditor.UserControls.HeaderUC"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    mc:Ignorable="d" 
    d:DesignHeight="27" 
    d:DesignWidth="100">
    
    <UserControl.Resources>
        <Style x:Key="SilverUp">
            <Style.Triggers>
                <EventTrigger RoutedEvent="Grid.MouseEnter">
                    <EventTrigger.Actions>
                        <BeginStoryboard HandoffBehavior="Compose">
                            <Storyboard>
                                <ColorAnimation
                                    Storyboard.TargetProperty="Background.Color"
                                    From="Transparent"
                                    To="Silver"
                                    Duration="0:0:0.3">
                                </ColorAnimation>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger.Actions>
                </EventTrigger>
                <EventTrigger RoutedEvent="Grid.MouseLeave">
                    <EventTrigger.Actions>
                        <BeginStoryboard HandoffBehavior="Compose">
                            <Storyboard>
                                <ColorAnimation
                                    Storyboard.TargetProperty="Background.Color"
                                    From="Silver"
                                    To="Transparent"
                                    Duration="0:0:0.3">
                                </ColorAnimation>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger.Actions>
                </EventTrigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>
    
    <Grid
        Background="Transparent"
        Style="{StaticResource SilverUp}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Image
            x:Name="image"
            Grid.Column="0"
            Source="/PersianEditor;component/Resources/Images/Leaves/BaseLeave.png" 
            Height="25" 
            Width="25"
            VerticalAlignment="Center">
        </Image>
        <TextBlock
            x:Name="textBlock"
            Grid.Column="1"
            Text="HeaderName"  
            VerticalAlignment="Center"
            HorizontalAlignment="Left">
        </TextBlock>
    </Grid>
</UserControl>
